package com.fruit.service.index.impl;


import java.util.HashMap;
import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.fruit.mapper.index.IndexMapper;
import com.fruit.service.index.IndexManager;


/** 首页
 * 修改时间：2016.07.14
 */
@Service("indexService")
public class IndexService implements IndexManager{
	
	
	@Autowired
	private IndexMapper indexMapper;
	/**
	 * 商品列表
	 */
	@Override
	public List<Map<String, Object>> getGoodsList(Map<String, Object> page) {
		return indexMapper.getGoodsList(page);
	}

	/**
	 * 推荐位
	 */
	@Override
	public List<Map<String, Object>> getRecommended(Map<String, Object> postion) {
		return indexMapper.getRecommended(postion);
	}

	/**
	 * 搜索
	 */
	@Override
	public List<Map<String, Object>> getListByNameAndKeyword(Map<String, Object> page) {
		return indexMapper.getListByNameAndKeyword(page);
	}

	/**
	 * 热门标签
	 */
	@Override
	public List<Map<String, Object>> searchLable(Map<String, Object> page) {
		return indexMapper.searchLable(page);
	}
	/**
	 * 当季时令推荐位
	 */
	@Override
	public List<Map<String, Object>> getGoodsListByPosition(Map<String, Object> page) {
		return indexMapper.getGoodsListByPosition(page);
	}

	@Override
	public Integer getIdByCode(String code) {
		return indexMapper.getIdByCode(code);
	}

	@Override
	public List<Map<String, Object>> getNameById(Integer classId) {
		return indexMapper.getNameById(classId);
	}

	@Override
	public List<Map<String, Object>> getNameByClassId(Map<String, Object> res) {
		return indexMapper.getNameByClassId(res);
	}


	
}
